#!/bin/sh

rm pkg/*.tar.gz
DATE=`date +%Y%m%d`
PKG="odai"
USR="--owner 1000 --group 1000 --same-permissions"
EXCLUDE=' --exclude "*~" --exclude .svn ' 

echo "Artificial Intelligence routines" > pkg/$PKG.desc
cp pkg/*.desc ./var/pkg


chmod 0750 ./usr/local/opendomo/services/config/*

# odai main package 
tar zcf  pkg/$PKG-$DATE.od.noarch.tar.gz etc usr var $USR $EXCLUDE
exit 0

make || exit 1


# odai_eventprediction
#tar zcf  pkg/odai_eventprediction-$DATE.od.i486.tar.gz bin/odai-eventprediction  $USR $EXCLUDE

# Actual compilation exits with errors. Return value forced provisionally
exit 0
